1. Field of the Invention
This invention relates to a method and apparatus for calibrating positions of a plurality of first light sources on a first part when the first light sources are attached thereto, particularly, but not exclusively suitable for robotic parts handling and working.
2. Discussion of Prior Art
In any system involving automated movement of parts where the movement is controlled by an external sensor system, optical targets used to sense the position and orientation of parts are usually fixed thereto at known locations on the partxe2x80x94i.e. at known locations in the co-ordinate system of the part. However, this assumes that the targets can be fixed to the part extremely accurately, and this is often difficult to achieve in practice, particularly if the part is transferred between different environments and conditions. In the majority of robotic applications that use photogrammetry as its external sensor system, the assumption of known positions of the photogrammetric targets on the part underpins the majority of the subsequent calculations, and thus any discrepancies can result in inaccurate positioning and/or working of the part.
In this specification, the external surface of the part upon which targets are affixed is referred to as a facet, and this term includes curved and flat external surfaces of the part.
There is therefore a need for a generally improved method and apparatus for calibrating positions of a plurality of first light sources on a part that does not require positioning the optical targets at known locations in the coordinate frame of the part.
According to a first aspect of the present invention there is provided a method for calibrating positions of a plurality of first light sources on a first part when the first light sources are attached thereto, including the steps of measuring first positions of the plurality of first light sources, each of which first light sources is either an active light source or an illuminable reflecting point and matching the first positions to a data file geometrically describing the first part.
Preferably matching the first positions to a data file includes generating a first light source to facet mapping, which first light source to facet mapping specifies which facet of the first part the first light sources are located on, estimating a transformation that transforms the first positions into a co-ordinate frame of the first part, thereby generating estimated positions of the first light sources on the first part, which estimated positions are in the co-ordinate frame of the first part, calculating first distances from the estimated positions to respective facets of the first part, inputting the first distances into a least mean squares (LMS) error function so as to generate a plurality of errors, and optimising said errors so as to locate the positions of said plurality of first light sources on the first part.
Conveniently each of the first distances corresponding to each of the plurality of first light sources is given by taking an intersection between a vector normal to the local surface of the corresponding facet and the estimated position, which vector normal is derivable from a first data file containing a geometric definition of the first part.
According to a further aspect of the present invention there is provided apparatus for calibrating positions of a plurality of first light sources on a first part when the first light sources are attached thereto, including measurement means operable to measure first positions of the plurality of first light sources, mapping means for generating a first light source to facet mapping, transformation means for transforming the first positions onto the first part, a first data file stored on a computer readable disk, which first data file provides a geometric definition of the first part, and a processor for processing first positions measured by the measurement means and for manipulating the same in conjunction with the mapping means, the transformation means and the first data file, so as to calibrate the positions of plurality of first light sources on a first part when said first light sources are attached thereto.
Preferably the measurement means includes an end-effector, at least two imaging devices, each attachable to the end-effector and each configurable to image all facets of the first part, at least two second light sources, each associated with a respective imaging device, and communication links between the imaging devices and the processor for transmitting output signals indicative of the first positions.
Conveniently each of the imaging devices is a metrology sensor operable to create digitisable images.
Advantageously each of the plurality of first light sources is a reflective target.
Preferably there is at least six first light sources positioned on three different facets of the first part.
Conveniently the communication links include coaxial cables and framegrabber ports.
Advantageously the first data file is a Computer Aided Design (CAD) model of the first part.